package com.example.modulemine.view.activity.mine;


import android.os.Bundle;
import android.view.View;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.example.baselibs.base.activity.BaseToolBarActivity;
import com.example.baselibs.router.path.ModuleMinePath;
import com.example.baselibs.utils.ShareUtil;
import com.example.modulemine.R;
import com.example.modulemine.R2;

import butterknife.OnClick;

@Route(path = ModuleMinePath.PATH_MINE_ACTIVITY)
public class MineActivity extends BaseToolBarActivity {


    @Override
    public String setTitle() {
        return "我的";
    }


    @Override
    public int getLayoutRes() {
        return R.layout.activity_mine;
    }

    @Override
    public void initData(Bundle savedInstanceState) {

    }

    @OnClick({R2.id.iv_user_icon,R2.id.tv_user_name,R2.id.tv_user_id,
            R2.id.tv_share,R2.id.tv_qr_code,R2.id.tv_app_update,R2.id.tv_setting})
    public void onMineClick(View v){
        int id=v.getId();
        if (id==R.id.iv_user_icon||id==R.id.tv_user_name||id==R.id.tv_user_id){//个人信息

        }else if (id==R.id.tv_share){//一键分享
            ShareUtil.share(this,this.getResources().getString(com.example.baselibs.R.string.app_name) +
                    " 最新版本:http://www.chinaivf.com/down/index.php");
        }else if (id==R.id.tv_qr_code){//应用二维码
            toActivity(ModuleMinePath.PATH_QR_CODE);
        }else if (id==R.id.tv_app_update){//检查更新
            toActivity(ModuleMinePath.PATH_CHECK_UPDATE);
        }else if (id==R.id.tv_setting){//设置

        }


    }

}
